package cn.ito.zjgsu.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.ito.zjgsu.domain.Project;
import cn.ito.zjgsu.mapping.ProjectMapper;
import cn.ito.zjgsu.service.ProjectService;

@Transactional
@Service
public class ProjectServiceImpl implements ProjectService {

	@Autowired
	ProjectMapper proMapper;
	
	@Override
	public Project getProById(int projectId) {
		Project pro = proMapper.selectByPrimaryKey(projectId);
		return pro;
	}

	@Override
	public void cancelProById(int projectId) {
		Project record = proMapper.selectByPrimaryKey(projectId);
		record.setProjectDeleteTags("0");
		proMapper.updateByPrimaryKey(record);
	}

}
